﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnDilDegistir_Click(object sender, EventArgs e)
    {
        string dil = hidDil.Value;
        if (Request.Cookies["dil"] == null)
        {
            HttpCookie dilCookie = new HttpCookie("dil");
            dilCookie.Value = dil;
            dilCookie.Expires = DateTime.Now.AddMonths(6);
            Response.Cookies.Add(dilCookie);
        }
        else
        {
            HttpCookie dilCookie = Request.Cookies["dil"];
            dilCookie.Value = hidDil.Value;
            dilCookie.Expires = DateTime.Now.AddMonths(6);
            Response.AppendCookie(dilCookie);
        }

        DataAccess.GetLookUp(true);
        Response.Redirect(Page.GetRouteUrl("AnaSayfa", new { }));
    }
}